Extensions and DriversContentsFigures, Tables, and ListingsAbout This BookWhat to ReadChapter OrganizationConventions Used in This Book
Special FontsTypes of NotesNumerical Formats
IllustrationsDevelopment EnvironmentDeveloper Products and Support/Introduction to Printing Extensions and Drivers:About QuickDraw GX Printer Drivers and Printing Extensions"QuickDraw GX Printing and Messages#Figure 1-1 A printing message chainPrint Imaging Systems:Table 1-1 Print imaging systems that QuickDraw GX supportsPrinting Phases.Figure 1-2 The phases of QuickDraw GX printing+Extensions, Drivers, and the User Interface6Using Printing Extensions and Printer Drivers Together1Figure 1-3 Using multiple extensions concurrently1Figure 1-4 Several GXDespoolPage message handlersAUsing Resources to Create Printing Extensions and Printer DriversOverriding Printing Messages)Defining Components of the User Interface<Planning How to Write a Printing Extension or Printer DriverPrinting ExtensionsAbout Printing ExtensionsPrinting Extension Tasks#Adding Panels to Print Dialog BoxesNFigure 2-1 The background picture panel added to the expanded Print dialog box Modifying a Page During SpoolingModifying a Page During Imaging*Modifying the Device Communication ProcessDeveloping a Printing ExtensionKTable 2-1 Files used to implement the background picture printing extensionSFigure 2-2 A page printed while the background picture printing extension is activeThe Jump TableSTable 2-2 Printing messages overridden by the background picture printing extensionFListing 2-1 The override resource for the background picture extension?Listing 2-2 The jump table for the background picture extensionThe Printing Message OverridesATable 2-3 Implementation types for QuickDraw GX printing message !Choosing the Messages to OverrideForwarding Messages3Listing 2-3 Forwarding the GXJobPrintDialog messageSending Messages1Writing the Background Picture Extension Messages&Initializing the Extension EnvironmentSListing 2-4 The background picture extension’s override of the GXInitialize message9Adding a Background Picture Panel to the Print Dialog BoxWListing 2-5 The background picture extension’s override of the GXJobPrintDialog message,Listing 2-6 The BackwashCollection structureGListing 2-7 The background picture extension’s SetupPrintPanel function:Handling an Event in the Background Picture Printing Panel+Listing 2-8 The gxPanelInfoRecord structureKTable 2-4 Panel events handled by the background picture printing extension+Listing 2-9 The BWHandlePanelEvent function+Listing 2-10 The OpenBackwashPanel function'Adding the Background Picture to a Page'Listing 2-11 The BWDespoolPage function%Listing 2-12 The AddBackwash function:Shutting Down the Background Picture Extension Environment&Using Resources in Printing Extensions<Table 2-5 Resource types used to define a printing extension1Defining Code Segments in Your Printing Extension-Defining the Scope of Your Printing Extension$Table 2-6 Scope resource identifiersMListing 2-13 The scope resource for the background picture printing extensionListing 2-14 A scope example$Optimizing the Use of Your Extension0Listing 2-15 Example of an optimization resource2Specifying Which Messages Your Extension Overrides,Listing 2-16 Example of an override resource,Defining the Loading Order of Your Extension2Table 2-7 Loading order constants for an extensionCListing 2-17 The load resource for the background picture extensionPrinter DriversAbout Printer DriversWriting Data to the Spool File Reading Data From the Spool FileConverting QuickDraw GX Shapes&Communicating With the Printing deviceInterfacing With the FinderProviding a Chooser Interface$Handling Status and Alert Conditions>Figure 3-1 Printing status display in a desktop printer window;Providing Compatibility With the Macintosh Printing ManagerWriting Printer Driver FilesNTable 3-1 Files used to implement the ImageWriter II printer driver(continued)$Message Overrides and the Jump TableVTable 3-2 Printing messages overridden by the ImageWriter II printer driver(continued)IListing 3-1 Two override resources from the ImageWriter II printer driver@Listing 3-2 The jump table for the ImageWriter II printer driverThe Message Overrides!Choosing The Messages to OverrideMTable 3-3 Message overrides for the LaserWriter IIg printer driver(continued)Forwarding Messages3Listing 3-3 Forwarding the GXRasterLineFeed messageSending Messages-Handling Exceptions in Your Message Overrides;Listing 3-4 Using the nrequire macro for exception handlingUsing the Printing CollectionsFigure 3-2 The job collectionETable 3-4 Tag ID constants for items in the job collection(continued)7The QuickDraw GX ImageWriter II Printer Driver Messages+Initializing the ImageWriter II Environment:Listing 3-5 Initializing the ImageWriter II printer driver/Providing the Application With Printing Options1Listing 3-6 Setting up the default printer objectDTable 3-5 Color values for an 8-color printer view device(continued)3Establishing the Preferred Printing CharacteristicsWListing 3-7 Establishing the printing resolution setting for the ImageWriter II printer9Listing 3-8 Determining the preferred job formatting mode)Storing the Current Printer Configuration;Listing 3-9 Opening the connection with the printing deviceJListing 3-10 Getting information about the printing device’s configuration!Responding to Direct Mode Queries2Listing 3-11 Responding to a job format mode query&Setting Up the Parameters for Printing3Listing 3-12 Setting up the print job constant data,Listing 3-13 Establishing the print qualitynManaging Special Page HandlingEListing 3-14 Determining if the print job uses any manually fed pages/Listing 3-15 Finding the manual feed paper name6Displaying Status Information and Printing Alert BoxesDListing 3-16 Displaying an alert box with printer status informationLTable 3-6 Predefined alert conditions for printing device drivers(continued)4Checking for When an Alert Condition Resolves Itself?Listing 3-17 Checking if an alert condition has resolved itself(Filling in Alert Information at Run Time4Listing 3-18 Modifying alert information at run time&Displaying Status Text During PrintingMTable 3-7 Status text IDs in the page transmission status resource(continued))Rendering the Page on the Printing DeviceColor PrintingTerminating the Print Job>Listing 3-19 The ImageWriter II print job termination function4Providing Compatibility in the ImageWriter II DriverUsing Resources in DriversCTable 3-8 Resource types used to define a printer driver(continued)%Defining Code Segments in Your Driver/Specifying Which Messages Your Driver OverridesEListing 3-20 Override resources for the ImageWriter II printer driver/Defining the Imaging System Type of Your Driver*Table 3-9 Imaging system values(continued)NListing 3-21 The imaging system resource for the ImageWriter II printer driver7Specifying How Your Driver Communicates With the DeviceKListing 3-22 Communications resources for the ImageWriter II printer driverfListing 3-23 The buffering and input/output preferences resource for the ImageWriter II printer driver0Defining Network Characteristics for Your DriverDListing 3-24 Capture resources for the ImageWriter II printer driverDefining Status MessagesDListing 3-25 A status resource for the ImageWriter II printer driver?Resources for Compatibility with the Macintosh Printing ManagerMListing 3-26 The customization resource for the ImageWriter II printer driver=Defining Device Characteristics Specific to an Imaging SystemRListing 3-27 The raster preferences resource for the ImageWriter II printer driverOListing 3-28 The raster package resource for the ImageWriter II printer driver.XListing 3-29 Ther raster package controls resource for the ImageWriter II printer driver"User Interface and Chooser SupportProviding Printing ChoicesThe Chooser and Your DriverDListing 3-30 The look resource for the ImageWriter II printer driver6Defining Desktop Printer Icons for Your Printer Driver*Figure 3-3 The passive printer state iconsThe Status IconsFigure 3-4 The status icons)Figure 3-5 The active printer state icons(Figure 3-6 Summary of the Printing IconsPrinting MessagesAbout the Printing MessagesPrinting Message TerminologyUsing the Printing MessagesPrinting Messages ReferenceData Types for Printer DriversThe Print-to-File StructureThe Printing Buffer StructureThe Page Information StructureEConstants and Data Types for Macintosh Printing Manager CompatibilityThe Universal Print Structure3Calculation Modes for the Universal Print Structure3Feed Mode Options for the Universal Print Structure/Print Options for the Universal Print Structure;Paper Orientation Options for the Universal Print Structure5Print Quality Modes for the Universal Print Structure7Paper Tray Selections for the Universal Print Structure4Cover Page Options for the Universal Print Structure4Print-Head Motions for the Universal Print Structure1File Save Types for the Universal Print StructureConstants for Paper-HandlingTray Mapping Options6Constants and Data Types for the Raster Imaging SystemRaster Offscreen Structure Raster Offscreen Plane Structure Raster Offscreen Setup Structure&Raster Offscreen Plane Setup StructureRaster Plane Options Raster Package Bitmap Structure Raster Imaging System StructureRaster Render Options6Constants and Data Types for the Vector Imaging SystemVector Haltone Structure#Vector Halftone Component StructureVector Shape StructureVector Shape OptionsVector Imaging System StructureVector Render Options:Constants and Data Types for the PostScript Imaging System#PostScript Imaging System StructurePostScript Render OptionsPostScript Glyphs Structure'PostScript Procedure Set List StructurePostScript Query Results'User Interface Constants and Data TypesThe Panel Information StructurePanel EventsPanel ResponsesPanel Event ActionsThe Panel Setup StructurePrinting Panel KindsParse Range ResultsThe Status StructureTable 4-1 Status type IDsThe Manual Feed StructureThe Display StructurePrinting MessagesStorage MessagesGXInitialize
GXPrJobDialogGXPrStlInitGXPrJobInitGXPrDlgMainGXPrValidateGXPrGeneralGXPrJobMergeGXConvertPrintRecordFromGXConvertPrintRecordToGXPrintRecordToJobFinder Dialog Box MessagesGXWriteStatusToDTPWindowGXInitializeStatusAlertGXHandleAlertEventGXHandleAlertStatusFinder Menu MessagesGXGetDTPMenuListGXDTPMenuSelectGXDTPMenuEventFilterSummary of Printing Messages(Printing Functions for Message OverridesAbout the Printing FunctionsUsing the Printing Functions6Displaying Status Information and Printing Alert BoxesManaging Paper Trays+Listing 5-1 Looping through the paper trays*Storing and Accessing Desktop Printer Data.Listing 5-2 Accessing the desktop printer data%Providing Application Imaging OptionsAccessing Driver DataInterfacing With the ChooserEListing 5-3 The Device function for the ImageWriter II printer driver#Using the Message Cleanup Functions8Listing 5-4 Calling the GXCleanupOpenConnection functionSegmenting Your Driver CodePrinting Functions ReferenceConstants and Data TypesTray Index TypeTray Mapping ModesJob Format ModesJob Format Mode Table Functions!Reporting Information to the UserGXReportStatusGXAlertTheUserGXGetCoolAlertGXCoolAlertManaging Paper TraysGXCountTrays
GXGetTrayNameGXGetTrayMappingGXSetTrayPaperTypeGXGetTrayPaperType*Storing and Accessing Desktop Printer DataGXWriteDTPDataGXFetchDTPDataAdding a Print Dialog Box PanelGXSetupDialogPanel(Working with Application Imaging OptionsGXAddPrinterViewDeviceGXGetAvailableJobFormatModesGXSetPreferredJobFormatModePrinting Control FunctionsGXGetJobGXGetMessageHandlerResFile GXJobIdleGXSpoolingAbortedGXHandleChooserMessage4Table 5-1 Messages that the Chooser sends to drivers/Handling Error Conditions in a Message OverrideGXCleanupOpenConnectionGXCleanupStartJobGXCleanupStartPageGXCleanupStartSendPage Segmenting Message Override CodeGXPrintingDispatchSummary of Printing FunctionsPrinting ResourcesAbout the Printing ResourcesResource ID NumberingResource Attributes#Extension and Driver Resource FilesPrinting Resources Reference
Data Types+The Buffering and I/O Preferences StructureThe Customization StructureThe Resolution StructureRaster Preferences StructureRaster Render OptionsRaster Package StructureRaster Package Options!Raster Package Controls StructureStandard Number Structure Resources:Resources Used for Printing Extensions and Printer DriversThe Override ('over') Resource Figure 6-1 The override resource*Table 6-1 Override resource IDs(continued)/Table 6-2 Printing message constants(continued).Listing 6-1 An example of an override resourceThe Status ('stat') ResourceFigure 6-2 The status resource!Table 6-3 Status types(continued)+Listing 6-2 An example of a status resource$The Printing Alert ('cool') Resource"Figure 6-3 The cool alert resource(Table 6-4 Cool alert versions(continued)3Table 6-5 Cool alert icon IDs(continued)(continued)<Table 6-6 Cool alert default button string values(continued);Table 6-7 Cool alert cancel button string values(continued)/Listing 6-3 An example of a cool alert resource+Resources Used Only for Printing Extensions%The Extension Scope ('scop') Resource'Figure 6-4 The extension scope resource=Table 6-8 Extension scope resource imaging system identifiers$Table 6-9 Scope resource identifiersBListing 6-4 Example of a pair of extension resources used together$The Extension Load ('load') Resource&Figure 6-5 The extension load resource,Table 6-10 Extension load priority constants4Listing 6-5 An example of an extension load resource,The Extension Optimization ('eopt') Resource.Figure 6-6 The extension optimization resource;Table 6-11 Extension optimization resource flags(continued)<Listing 6-6 An example of an extension optimization resource&Resources Used Only in Printer Drivers1Table 6-12 Resources used only in printer drivers$The Imaging System ('isys') Resource&Figure 6-7 The imaging system resource4Listing 6-7 An example of an imaging system resourceThe Look ('look') ResourceFigure 6-8 The look resource'Table 6-13 Look resource flag constants)Listing 6-8 An example of a look resource#The Communication ('comm') Resource,Figure 6-9 The serial communication resource)Table 6-14 Baud rate constants(continued)&Table 6-15 Parity constants(continued)(Table 6-16 Stop bit constants(continued))Table 6-17 Data bits constants(continued)/Figure 6-10 Input and output handshaking values+Table 6-18 Handshake error types(continued)JTable 6-19 Status changes that cause driver events to be posted(continued):Listing 6-9 An example of a serial communications resource*Figure 6-11 The PAP communication resource?Listing 6-10 An example of an AppleTalk communications resource3Figure 6-12 The PrinterShare communication resourceAListing 6-11 An example of a PrinterShare communications resource+Figure 6-13 The SCSI communication resource9Listing 6-12 An example of a SCSI communications resource#The Customization ('cust') Resource&Figure 6-14 The customization resource<Table 6-20 Customization resource updriver values(continued)/Table 6-21 Translator setting values(continued)3Listing 6-13 An example of a customization resource The Resolution ('resl') Resource#Figure 6-15 The resolution resource0Listing 6-14 An example of a resolution resource"The Print Record ('PREC') Resource%Figure 6-16 The print record resource2Listing 6-15 An example of a print record resource<The Buffering and Input/Output Preferences ('iobm') Resource?Figure 6-17 The buffering and input/output preferences resourceLListing 6-16 An example of a buffering and input/output preferences resourceThe Capture ('cpts') Resource Figure 6-18 The capture resource,Table 6-22 Capture resource types(continued);Table 6-23 Capture resource substitution strings(continued)?Listing 6-17 Examples of capture resources for a printer driver(The Raster Preferences ('rdip') Resource+Figure 6-19 The raster preferences resource6Table 6-24 Raster preferences option values(continued)RTable 6-25 Flags used for each plane in the raster preferences resource(continued)+Table 6-26 Plane dithering types(continued))Table 6-27 Plane tinting types(continued)8Listing 6-18 An example of a raster preferences resource$The Raster Package ('rpck') Resource'Figure 6-20 The raster package resource,Table 6-28 Raster packing options(continued)4Listing 6-19 An example of a raster package resource-The Raster Package Controls ('ropt') Resource0Figure 6-21 The raster package controls resource=Table 6-29 Number types for specifiying line feeds(continued)=Listing 6-20 An example of a raster package controls resource(The Print File Formats ('pfil') Resource+Figure 6-22 The print file formats resource8Listing 6-21 An example of a print file formats resource#The Print Options ('prop') Resource&Figure 6-23 The print options resource3Listing 6-22 An example of a print options resourceThe Color Set ('cset') Resource"Figure 6-24 The color set resource)The PostScript Scanning ('scan') Resource,Figure 6-25 The PostScript scanning resourceOListing 6-23 An example of a PostScript scanning resources for a printer driver6The PostScript Procedure Set Control ('prec') Resource9Figure 6-26 The PostScript procedure set control resource5Table 6-30 PostScript procedure data flags(continued)2The PostScript Printer Font Type ('pfnt') Resource:Figure 6-27 Adobe character set printer font type resourceLListing 6-24 An example of an Adobe character set printer font type resource:Figure 6-28 Apple character set printer font type resourceLListing 6-25 An example of an Apple character set printer font type resource?Figure 6-29 Equivalent character set printer font type resourceQListing 6-26 An example of an equivalent character set printer font type resource3Figure 6-30 Encoded font printer font type resourceNListing 6-27 An example of an encoded character set printer font type resource,The PostScript Preferences ('pdip') Resource+Figure 6-31 PostScript preferences resource<Listing 6-28 An example of a PostScript preferences resourceSummary of Printing ResourcesIndex